﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="IDM.Sandbox._Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Sandbox</title>
    <script type="text/javascript">
    function evaluateParams()
    {
		var data = {
			Hello: 'World',
			Number: '1',
			Array: [1, 2, 3, 4]
		}
		
		Ext.net.DirectMethod.request('Direct', {
			params: {
				data: Ext.encode(data)
			},
			success: function(result){
				debugger;
			}
		});
    }
    
    </script>
</head>
<body>
	<ext:ResourceManager runat="server">
	</ext:ResourceManager>
	
    <form id="form1" runat="server">    
    
    <ext:Viewport runat="server">
    <Content>
		<ext:Button runat="server" ID="DialogButton"
			Text="Show Dialog">
		<Listeners>
			<Click Handler="showDialog(#{Dialog1}, {name: 'Hello', id: 2});" />
		</Listeners>
		</ext:Button>
		<ext:Button runat="server" Text="Direct">
		<Listeners>
			<Click Handler="evaluateParams();" />
		</Listeners>
		</ext:Button>
		
		<mdm:Dialog runat="server" ID="Dialog1"			
			DialogButtons="Cancel,Apply"
			Url="Test.aspx">			
		</mdm:Dialog>
		
		<mdm:GridPanel runat="server" ID="Grid"
			Height="300">
		<Store>
			<ext:Store runat="server" ID="GridStore">
			<Reader>
				<ext:JsonReader>
				<Fields>
					<ext:RecordField Type="Int" Name="Id" />
					<ext:RecordField Name="Name" />
					<ext:RecordField Name="Date" />
					<ext:RecordField Name="Address" />
					<ext:RecordField Type="Int" Name="Type" />
				</Fields>
				</ext:JsonReader>
			</Reader>
			</ext:Store>
		</Store>
		</mdm:GridPanel>
		
		<mdm:TabPanel runat="server" ID="Navigation" Height="500">
		</mdm:TabPanel>
		
    </Content>    
    </ext:Viewport>
    
    </form>
    
    
</body>
</html>
